package com.hd.json2mysql.utils;

import com.fasterxml.jackson.databind.JsonNode;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.node.ObjectNode;

import java.io.File;
import java.io.IOException;

public class JsonReader {
    public static JsonNode readJson(String path) throws IOException {

        ObjectMapper mapper = new ObjectMapper();
        // 解析为可修改的ObjectNode
        return mapper.readTree(new File(path));
    }
}
